package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 预警等级(1一般预警 2严重预警)
 */
public enum WarnLevelEnum {

    /**
     * 一般预警
     */
    GENERAL_EARLY(1,"一般预警"),

    /**
     * 严重预警
     */
    SERIOUS_EARLY(2,"严重预警");

    private WarnLevelEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (WarnLevelEnum warnLevel : WarnLevelEnum.values()) {
            if (warnLevel.getValue().intValue()==value) {
                return warnLevel.getDesc();
            }
        }
        return null;
    }
}
